<?php
require "../template/header.php";
require "../function/function_user.php";

if ($mysqlpass!=$cookiepass){
header("Location:../do.php?type=logints");
}
?>
	<body>
		<div id="warp">
			<div id="user-header">
				<div id="user-logo">
					<a href="./">
						<img border="0" src="../images/logo.png">
					</a>
				</div>
<?php
require_once "../template/user_info.php";
?>
			</div>
			<div id="user-content">
				<div id="user-content-left">
<?php
require_once "../template/user_menu.php";
?>
				</div>
				<div id="user-content-right">
					<div id="user-content-right-main">
						<div id="user-content-right-main-tou">
							<a href="./">首页</a> > <a href="./">帐号信息</a>
						</div>
						<div id="user-content-right-main-info">
							<div id="user-content-right-main-info-main">
								<!-- 开始 -->
								<div id="user-content-right-main-info-title">
									个人信息
								</div>
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										用户名
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="<?php echo $cookieuser;?>" readonly />
									</div>
								</div>
							
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										注册日期
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="<?php echo date("Y-m-d H:i:s",$userdata['regdate']);?>" readonly />
									</div>
								</div>
							
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										会员级别
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="<?php if($userdata['tip']=="0"){ echo "普通会员"; }else { echo"顶尖会员"; }?>" readonly />
									</div>
								</div>
							
								<div id="user-content-right-main-info-main-a">
										<div id="user-content-right-main-info-main-a-a">
											挂Q配额
										</div>
										<div id="user-content-right-main-info-main-a-b">
											<input type="text" value="已用<?php echo $userinfo['qqnum'];?>/总配额:<?php echo $userinfo['quota'];?>" readonly />
										</div>
								</div>
							
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										推广人数
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="<?php echo $userinfo['spread'];?>人" readonly />
									</div>
								</div>
							
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										挂Q时长
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="<?php echo round($userinfo['length']/60,0);?>分钟" readonly />
									</div>
								</div>
								
								<div id="user-content-right-main-info-main-a">
									<div id="user-content-right-main-info-main-a-a">
										争分夺秒
									</div>
									<div id="user-content-right-main-info-main-a-b">
										<input type="text" value="抢到<?php echo $userinfo['racetime'];?>次" readonly />
									</div>
								</div>
							
							</div>
							<div id="user-content-right-main-info-right">
								<div id="user-content-right-main-info-title">
									个人设置
								</div>
								<div id="user-content-right-main-info-right-qiandao">
									<div id="user-content-right-main-info-right-qiandao-title">
										<h3>每日签到</h3>
									</div>
									<div id="user-content-right-main-info-right-qiandao-main">
										<div id="user-content-right-main-info-right-qiandao-main-content">
											总共签到<span class="qiandao-color"><?php echo $info_qd['common']; ?></span>天
										</div>
										<div id="user-content-right-main-info-right-qiandao-main-content">
											已连续签到<span class="qiandao-color"><?php echo $info_qd['continuous']; ?></span>天
										</div>
										<div id="user-content-right-main-info-right-qiandao-main-content">
											上次签到时间:<span class="qiandao-color"><?php echo date("Y-m-d H:i:s",$info_qd['commontime']); ?></span>
										</div>
										<div id="user-content-right-main-info-right-qiandao-main-content">
											<span class="qiandao-weight">
											连续签到3天可扩充5个挂Q配额
											</span>
										</div>
									</div>
								</div>
								<div id="user-content-right-main-info-right-mima">
									<div id="user-content-right-main-info-right-mima-password">
										<h3>密码修改</h3>
										<form action="../do.php?type=changepass" method="post">
											<div id="user-content-right-main-info-right-mima-password-a">
												原密码:<input type="password" name="password" />
											</div>
											<div id="user-content-right-main-info-right-mima-password-a">
												现密码:<input type="password" name="passpass" />
											</div>
											<div id="user-content-right-main-info-right-mima-password-b">
												<button type="submit">更改密码</button>
											</div>
										</form>
									</div>
									<div id="user-content-right-main-info-right-mima-question">
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div id="footer">
<?php
require "../template/footer.php";
?>